
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=11" id="mixia_vpid">
    <title>个人主页</title>
    <meta name=keywords content="tzc">
    <meta name=description content="tzc">
    <link rel="icon" href="index/Picture/index.jpg">
    <link rel="shortcut icon" href="index/Picture/index.jpg">
    <link rel="stylesheet" href="index/css/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="index/css/main.css">
    <script>
        fetch("https://v1.hitokoto.cn/")
            .then(res => res.json())
            .then(data => susays.innerText = data.hitokoto);
    </script>
    <style type="text/css">
       body{background-image: url(index/images/1624077728626.jpg);background-repeat: repeat-x};

    </style>    
    

    </iframe>
</head>

<body>
  <canvas id="canvas" width="0" height="0"></canvas>
    <span class="mobile btn-mobile-menu">
        <i class="fa fa-bars btn-mobile-menu__icon"></i>
        <i class="fa fa-chevron-circle-up btn-mobile-close__icon hidden"></i>
    </span>
    <div class="panel-main">
        <div class="panel-main__inner panel-inverted">
            <div class="panel-main__content">
                <a href="http://101.35.110.87:8082/myindex.html" ><img src="index/Picture/index.jpg" width="150" alt="LOGO" class="panel-cover__logo logo"></a>
                <h1 class="panel-cover__title panel-title" id="名称"></h1>
        <hr class="panel-cover__divider">
        <p class="panel-cover__description" id="susays"></p>
        <hr class="panel-cover__divider"> 
        
        <p id="胜率"></p>
        <p id="胜场数"></p>
        <p id="对局场数"></p>
        <script src="js/script.js"></script>
        <script src="js/jquery-2.1.0.min.js"></script>
        <script>
          const on=document.getElementById("名称");
          const winv=document.getElementById("胜率");
          const winc=document.getElementById("胜场数");
          const pc=document.getElementById("对局场数");

          $.ajax({
              url: "/Searchinfo",
              type: "Get",
              dataType: "JSON",
              //async : false ==> 禁止异步请求   chrome 有可能会禁止 ajax 的同步请求
              async: false,
              success: function (data) {
                  if (data.status === 1) {
                      console.log("success");
                      on.innerHTML=data["name"];
                      winv.innerHTML="胜率:"+(data["wincount"]*100)/data["playcount"]+"%";
                      pc.innerHTML="对局次数:"+data["playcount"];
                      winc.innerHTML="胜场数:"+data["wincount"];
                  }
                  else{
                    alert(" 请登录！");
                    window.location.href = "index.html";
                  }
              },
          });

        </script>

        <div class="navigation-wrapper">
          <div>
            <nav class="cover-navigation cover-navigation--primary">
              <ul class="navigation">
                  
                <li class="navigation__item"><a href="http://101.35.110.87:8082/historical.html" > 历史对局</a></li>
                <li class="navigation__item"><a href="http://101.35.110.87:8082/gobang.html">开始游戏</a></li>
               

              </ul>
            </nav>
          </div>
          

        </div>
      </div>
    </div>
    <div class="panel-cover--overlay cover-slate"></div>
  </div>
</header>

</body>
</html>
